namespace KPIS.GERP.Models.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class update0067 : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("dbo.SysApprovePath", "ExecPosGroupId", "dbo.sys_exec_pos_group");
            DropIndex("dbo.SysApprovePath", new[] { "ExecPosGroupId" });
            AddColumn("dbo.SysApprovePath", "ExecPosId", c => c.Int());
            AddForeignKey("dbo.SysApprovePath", "ExecPosId", "dbo.hrm_mp_exec_positions", "exec_pos_seq");
            CreateIndex("dbo.SysApprovePath", "ExecPosId");
            DropColumn("dbo.SysApprovePath", "ExecPosGroupId");
        }
        
        public override void Down()
        {
            AddColumn("dbo.SysApprovePath", "ExecPosGroupId", c => c.Int());
            DropIndex("dbo.SysApprovePath", new[] { "ExecPosId" });
            DropForeignKey("dbo.SysApprovePath", "ExecPosId", "dbo.hrm_mp_exec_positions");
            DropColumn("dbo.SysApprovePath", "ExecPosId");
            CreateIndex("dbo.SysApprovePath", "ExecPosGroupId");
            AddForeignKey("dbo.SysApprovePath", "ExecPosGroupId", "dbo.sys_exec_pos_group", "exec_pos_group_seq");
        }
    }
}
